package com.atguigu.service;

import com.atguigu.pojo.Subtask;
import com.atguigu.pojo.Page;

import java.util.List;

//在task中建立taskService,定义taskServiceImpl需要实现的方法
public interface SubtaskService {
    public void addSubtask(Subtask subtask);
    public void updateSubtask(Subtask subtask);
    public void setSubtaskStatusByMainTaskId(String mainTaskId,String status);
    public void deleteSubtaskById(String id);
    public void deleteSubtaskByMainTaskId(String mainTaskId);
    public Subtask querySubtaskById(String id);
    public Integer querySubtasksByStatusNotTrue();
    public List<Subtask> querySubtasksByServerId(String serverId);
    public List<Subtask> queryNeedDoSubtasksByServerId(String serverId);
    public List<Subtask> queryNeedDoSubtasksByMainTaskId(String mainTaskId);
    public List<Subtask> querySubtasksByMainTaskId(String mainTaskId);
    public List<Subtask> querySubtasksByCommand(String subtaskCommand);
    public List<Subtask> querySubtasksByServerIdAndSubtaskCommand(String serverId,String subtaskCommand);
    public List<Subtask> getSpeciallyAppointedTargetNodeMainTaskResult(String targetNodeId,String mainTaskId);
    public List<Subtask> querySubtasks();
    public Page page(Integer pageNo, Integer pageSize);
}
